<template>
  <div id="taber">
    <van-tabbar route v-model="active">
      <van-tabbar-item to="/home">
        <span>首页</span>
        <template #icon="props">
          <img :src="props.active ? icon.active : icon.inactive" />
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/curriculum">
        <span>课程</span>
        <template #icon="props">
          <img :src="props.active ? icon.active1 : icon.inactive1" />
        </template>
      </van-tabbar-item>
      <van-tabbar-item>
        <span>约课记录</span>
        <template #icon="props">
          <img :src="props.active ? icon.active2 : icon.inactive2" />
        </template>
      </van-tabbar-item>
      <van-tabbar-item>
        <span>练习</span>
        <template #icon="props">
          <img :src="props.active ? icon.active3 : icon.inactive3" />
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/my">
        <span>我的</span>
        <template #icon="props">
          <img :src="props.active ? icon.active4 : icon.inactive4" />
        </template>
      </van-tabbar-item>
    </van-tabbar>
    
  </div>
</template>
<script>
export default {
  data() {
    return {
      active: 0,
      icon: {
        active:require("@/assets/tab/44.png"),
        inactive: require("@/assets/tab/4.png"),
        active1: require("@/assets/tab/22.png"),
        inactive1: require("@/assets/tab/2.png"),
        active2: require("@/assets/tab/33.png"),
        inactive2: require("@/assets/tab/3.png"),
        active3: require("@/assets/tab/11.png"),
        inactive3: require("@/assets/tab/1.png"),
        active4: require("@/assets/tab/55.png"),
        inactive4: require("@/assets/tab/5.png"),
      },
    };
  },
};
</script>
<style lang="scss" scoped>
   
</style>